﻿@model IEnumerable<MIS4200_1045.Models.LineItem>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.product.description)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.qtyOrdered)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.price)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.orderID)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.product.description)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.qtyOrdered)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.price)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.orderID)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.lineitemID }) |
            @Html.ActionLink("Details", "Details", new { id=item.lineitemID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.lineitemID })
        </td>
    </tr>
}

</table>
